OtpButtonColors

Colors of an OTP button, created with OtpButtonDefaults.colors. content should have at least 4.5:1 contrast against container (WCAG 1.4.3); violations are logged once and listed in contrastWarnings, never thrown, so brand colors remain usable. The disabled pair is exempt.

Properties

Link copied to clipboard
val border: UIColor
Link copied to clipboard
val container: UIColor
Link copied to clipboard
val content: UIColor
Link copied to clipboard

Contrast problems for the current trait collection, empty when compliant.

Link copied to clipboard
val disabledBorder: UIColor
Link copied to clipboard
val disabledContainer: UIColor
Link copied to clipboard
val disabledContent: UIColor

Functions

Link copied to clipboard
fun contrastWarningsIn(traits: UITraitCollection): List<String>

Contrast problems when the colors are resolved for traits, for example dark mode or Increase Contrast.